home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 26 / AACD 26.iso / AACD / Programming / AllPlaton / Unsorted / AGACopperlistToPal.AMOS / AGACopperlistToPal.amosSourceCode
Encoding:
AMOS Source Code  |  1996-06-29  |  941 b   |  36 lines

  1. Reserve As Work 10,256*4
  2. CMAP=Start(10)
  3.  Extension_8_0456 "dh1:test.pal",9
  4. AD=Start(9)
  5. CMAPTAB=0 : LOHI=0
  6. I=5
  7. For A=0 To Length(9)-1 Step 2
  8.   CR=Deek(AD) : PA=Deek(AD+2) : Add AD,4
  9.   If CR=$106
  10.     CMAPTAB=(PA and $E000)/$2000
  11.     LOHI=(PA and $200)/$200
  12. '    Print CMAPTAB,LOHI : Wait Key 
  13.   End If 
  14.   If(CR<>$106 and CR<$180) or CR=>$1C0
  15. '    Print Hex$(CR,4) : Wait Key 
  16.   End If 
  17.   If CR=>$180 and CR<=$1C0
  18.     CO=(CR-$180)/2+CMAPTAB*32
  19.     If CO>255 : Stop : End If 
  20.     ST=CMAP+CO*4
  21.     R= Extension_8_03B2(PA)
  22.     G= Extension_8_03C0(PA)
  23.     B= Extension_8_03D0(PA)
  24.     If LOHI=1
  25.       Poke ST+1,(Peek(ST+1) and $F0)+R
  26.       Poke ST+2,(Peek(ST+2) and $F0)+G
  27.       Poke ST+3,(Peek(ST+3) and $F0)+B
  28.     Else 
  29.       Poke ST+1,(Peek(ST+1) and $F)+R*$10
  30.       Poke ST+2,(Peek(ST+2) and $F)+G*$10
  31.       Poke ST+3,(Peek(ST+3) and $F)+B*$10
  32.     End If 
  33.   End If 
  34.   If CO=255 Then Dec I : Exit If I=0
  35. Next 
  36.  Extension_8_0472 "ram:Test.cmap",10